/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package modele;

import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author sio
 */
public class Brocante {
    
    private String nombrocante;
    private String lieubrocante;
    private Date datebrocante;
    private Map <Integer, Type> lesTypes = new HashMap <Integer, Type>();
   
    public Brocante(){
        BrocanteDAO.chargeBrocante(this);
    }
    
    public String getNom(){
        return nombrocante;
    }
    public void setNom(String nombrocante){
        this.nombrocante = nombrocante;
    }
    public String getlieu(){
        return lieubrocante;
    }
    public void setLieu(String lieubrocante){
        this.lieubrocante = lieubrocante;
    }
    public Date getDate(){
        return datebrocante;
    }
    public void setDate(Date datebrocante){
        this.datebrocante = datebrocante;
    }
    
    
    public Map <Integer, Type> lesTypes() {
        return lesTypes;
    }
    
    public void addType(Type t){
        lesTypes.put(t.getCode(), t);
    } 
    
    public Collection <Type> getlesTypes(){
        return lesTypes.values();
    }
//    
//    public 
    
//reste getletype!!
    
}
